package com.xyht.medicine_management_system.modules.coupon.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 优惠劵表
 * </p>
 *
 * @author XYHT
 * @since 2023-11-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("mms_coupon")
@ApiModel(value = "MmsCoupon对象", description = "优惠劵表")
public class MmsCoupon implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "优惠劵ID")
    private String id;

    @ApiModelProperty(value = "优惠劵名称")
    private String name;

    @ApiModelProperty(value = "优惠劵代码")
    private String code;

    @ApiModelProperty(value = "优惠劵类型(1:满减 2:无门槛等)")
    private Integer type;

    @ApiModelProperty(value = "优惠劵图")
    private String picture;

    @ApiModelProperty(value = "优惠开始日期")
    private Date startDate;

    @ApiModelProperty(value = "优惠结束日期")
    private Date endDate;

    @ApiModelProperty(value = "满减金额")
    private BigDecimal fullReduction;

    @ApiModelProperty(value = "折扣")
    private Double discount;

    @ApiModelProperty(value = "优惠金额")
    private BigDecimal discountAmount;

    @ApiModelProperty(value = "使用条件")
    @TableField("`condition`")
    private String condition;

    @ApiModelProperty(value = "限制领取次数(优惠券总量)")
    private Integer receiveLimit;

    @ApiModelProperty(value = "每人限制使用次数(默认为1)")
    private Integer usageLimit;

    @ApiModelProperty(value = "适用商品类别")
    private String applicableCategories;

    @ApiModelProperty(value = "适用商品")
    private String applicableProduct;

    @ApiModelProperty(value = "创建人")
    private String creator;

    @ApiModelProperty(value = "状态(0:不可用  1:可用)")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String note;

    @ApiModelProperty(value = "版本号")
    @Version
    private String version;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "是否删除：0：未删除 1：已删除")
    @TableLogic
    private Integer isDeleted;


}
